OpenBuildings GenerativeComponents Help

Function

As stated above, the function can be the name of a global function or an anonymous function. In the case of an anonymous function, the syntax is:

function(arguments)
{
    statement(s)
}

Alternatively, for small anonymous functions, we can use lambda expressions, which are generally easier to read and write:

(arguments) => { statement(s) }

In either case, the arguments list comprises of zero or more argument names, separated by commas. Optionally, each argument name may be prefaced by a type name.

Each argument name should be chosen to help identify the purpose of that argument within the function. For example, choose a name like 'numberOfVertices' rather than just 'n' or 'verts'.